﻿
using System.Collections.Generic;
namespace Sustainalytics.ClientDW.Entities
{
    public class GCPrincipleTemplate : IEqualityComparer<GCPrincipleTemplate>
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public GCPillarTemplate Pillar { get; set; }

        public bool Equals(GCPrincipleTemplate x, GCPrincipleTemplate y)
        {
            if (x == null && y == null)
                return true;

            if (x == null || y == null)
                return false;

            return
                x.Id == y.Id
                && x.Name == y.Name
                && x.Description == y.Description
                && new GCPillarTemplate().Equals(x.Pillar, y.Pillar);
        }

        public int GetHashCode(GCPrincipleTemplate obj)
        {
            return obj.GetHashCode();
        }
    }
}
